package com.wyx.suanfa;

/**
 * @author 王艺锡
 * @version 1.0
 */
public class invertTree {
    //给你一棵二叉树的根节点 root ，翻转这棵二叉树，并返回其根节点。
    public static void main(String[] args) {

    }
}

/*
*class Solution {
    public TreeNode invertTree(TreeNode root) {
        if(root == null){
            return root;
        }

        swapChild(root);
        invertTree(root.left);
        invertTree(root.right);
        return root;

    }

    public void swapChild(TreeNode root){
        TreeNode temp = root.left;
        root.left = root.right;
        root.right = temp;
    }
} */


